package com.lzq.mq.broker.model;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * CommitLog存储的消息模型
 * 消息大小存储在消费队列中, CommitLog只存储消息内容
 */
@Data
@AllArgsConstructor
public class CommitLogElementModel {

    /**
     * 消息内容
     */
    private byte[] content;

    public int getSize() {
        return content.length;
    }
}
